//
//  State.m
//  状态模式
//
//  Created by flannery on 2018/12/19.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "State.h"
#import "Context.h"

@implementation State
- (void)doAction:(Context *)context{}
@end

@implementation StartState
- (void)doAction:(Context *)context{
    NSLog(@"Player is in start state");
    context.state = self;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"StartState"];
}
@end

@implementation StopState

- (void)doAction:(Context *)context{
    NSLog(@"Player is in stop state");
    context.state = self;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"StopState"];
}
@end
